CC=gcc
CFLAGS=-I.

all: main

main: main.o lib/libcal.a
    $(CC) $(CFLAGS) -o main main.o -Llib -lcal

main.o: main.c
    $(CC) $(CFLAGS) -c main.c

lib/libcal.a:
    mkdir -p lib
    $(MAKE) -C lib

clean:
    rm -f *.o main
    $(MAKE) -C lib clean

.PHONY: all clean
